import request from '@/utils/request'

// 创建标签
export function createTages(data) {
  return request({
    url: '/system/tages/create',
    method: 'post',
    data: data
  })
}

// 更新标签
export function updateTages(data) {
  return request({
    url: '/system/tages/update',
    method: 'put',
    data: data
  })
}

// 删除标签
export function deleteTages(id) {
  return request({
    url: '/system/tages/delete?id=' + id,
    method: 'delete'
  })
}

// 获得标签
export function getTages(id) {
  return request({
    url: '/system/tages/get?id=' + id,
    method: 'get'
  })
}

// 获得标签分页
export function getTagesPage(params) {
  return request({
    url: '/system/tages/search',
    method: 'get',
    params
  })
}
// 导出标签 Excel
export function exportTagesExcel(params) {
  return request({
    url: '/system/tages/export-excel',
    method: 'get',
    params,
    responseType: 'blob'
  })
}
